Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


HandleEvent

The HandleEvent method should attempt to handle the specified user event.

ODBoolean HandleEvent (inout ODEventData event,
                       in ODFrame frame,
                       in ODFacet facet,
                       inout ODEventInfo eventInfo);
event
A platform-specific structure representing an event. On return, the fields of the structure may have been modified. On the Mac OS platform, the structure is defined as a Mac OS event record.
frame
A reference to a display frame in which the event occurred.
facet
A reference to a facet in which the event occurred, or kODNULL for events not based on geometry (for example, keyboard events) or events outside a modal focus.
eventInfo
A platform-specific structure that contains additional event information. On return, the relevant fields of the structure are filled in if the event was handled.
return value
kODTrue if this part handled the event, otherwise kODFalse.
DISCUSSION
OpenDoc calls this method to pass user events to this part.

The eventInfo structure contains the following information:

If this part has set the doesPropagateEvents flag for any of its embedded frames (by calling the embedded frame's SetPropagateEvents method), this part then receives any event not handled by an embedded frame in addition to it own events.

OVERRIDING
When you subclass ODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrInvalidFacet
The specified facet is not a facet of this part.
kODErrInvalidFrame
The specified frame is not a display frame of this part.
SEE ALSO
The ODEventData type (page 890).
The ODEventInfo type (page 891).
The ODFrame::SetPropagateEvents method (page 337).
"The HandleEvent Method" on page 78 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Mouse Events" on page 190 in OpenDoc Programmer's Guide.
"The HandleEvent Method of Your Part Editor" on page 196 in OpenDoc Programmer's Guide.
"Acquiring and Relinquishing the Modal Focus" on page 232 in OpenDoc Programmer's Guide.
"Acquiring and Relinquishing the Clipboard Focus" on page 352 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help